<template>
	<view class="pt50 pd">
		<view class="pd pr">
			<image src="../../static/image@2x.png" class="xcxzcztrry" mode="widthFix"></image>
			<image src="../../static/xczxdfd1.png" class="xczxtretycd ml60 pr"></image>
		</view>
		<view class="kxcxzrtyxr pr">
			<image src="../../static/xczxdfd2.png" class="cxxvxctyexct"></image>
			<view class="">
				<view class="fz50 b">
					{{kcvcx.title}}
				</view>
				<view class=" z9 fz24">
					{{kcvcx.riqi+" "+kcvcx.time}}
				</view>
				<view class="mt40">
					<view class="pt20 pm20 pd btm display-flex fz30 z6">
						<view class="xczxrty vertical-center">
							<text class="iconfont icon-shijian z6 fz36 cz cz"></text>
						</view>
						<view class=" vertical-center tl">
							不提前
						</view>
					</view>
					<view class="pt20 pm20 pd btm display-flex fz30 z6">
						<view class="xczxrty vertical-center">
							<text class="iconfont icon-tongzhi z6 fz36 cz cz"></text>
						</view>
						<view class=" vertical-center tl">
							通过微信提醒
						</view>
					</view>
					<view class="pt20 pm20 pd btm display-flex fz30 z6">
						<view class="xczxrty vertical-center">
							<text class="iconfont icon-xunhuan101 z6 fz36 cz cz"></text>
						</view>
						<view class=" vertical-center tl">
							不循环
						</view>
					</view>
					<view class="pt20 pm20 pd btm display-flex fz30 z6">
						<view class="xczxrty vertical-center">
							<text class="iconfont icon-jinggao z6 fz36 cz cz"></text>
						</view>
						<view class=" vertical-center tl">
							下次提醒：{{kcvcx.riqi+" "+kcvcx.time}}
						</view>
					</view>

					<view class="mt40">
						<view class="vertical-center">
							<view class="dccxdsrtgryu vertical-center fz32 cf" @tap="jieshke">
								接受
							</view>
							<view class="dccxdsrtgryu vertical-center fz32 cf mt20 ab" @tap="hf('bjhtijiao?id='+kcvcx.id)">
								编辑后接受
							</view>
							<view class="dccxdsrtgryu vertical-center fz32 cf mt20 ac" @tap="hf('list')">
								拒绝
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script lang="ts" setup>
	import { onLoad } from "@dcloudio/uni-app"
	import { ref } from "vue"
	import { hf, dxrequest, callBack } from "@/util/index.js"
	const kcvcx = ref(null)
	onLoad(async (rexer) => {
		uni.showLoading({
			title: "加载中..."
		})
		const { data } = await dxrequest("maya/renwu/renwu", { id: rexer.id || '1138' })
		console.log(data)
		kcvcx.value = data
		uni.hideLoading()
	})
	const openid = uni.getStorageSync("openid")
	const jieshke = async () => {
		if (openid == kcvcx.value.openid) {
			uni.showToast({
				title: "不能接受自己的邀请哦！",
				icon:"none"
			})
			return
		}
		await dxrequest("maya/renwu/renwu", kcvcx.value,"post")
		hf('list')
	}
</script>

<style scoped>
	.xczxtretycd {
		width: 200rpx;
		height: 200rpx;
	}

	.xcxzcztrry {
		width: 360rpx;
		position: absolute;
		left: 40rpx;
		bottom: 0rpx;
	}

	.kxcxzrtyxr {
		border-radius: 38rpx;
		background: #FFFFFF;
		min-height: 500rpx;
		border-radius: 20rpx;
		box-shadow: 0 0 20rpx rgba(255, 255, 255, 0.4);
		margin-top: -90rpx;
		position: relative;
		z-index: 100;
		padding: 40rpx;
	}

	.cxxvxctyexct {
		width: 264rpx;
		height: 272rpx;
		position: absolute;
		right: 0;
		top: -180rpx;
	}

	.xczxrty {
		width: 60rpx;
		margin-right: 20rpx;
	}

	.dccxdsrtgryu {
		width: 440rpx;
		height: 80rpx;
		border-radius: 20rpx;
		background: #D50C0C;
	}

	.dccxdsrtgryu.ab {
		background: #FF995A;
	}

	.dccxdsrtgryu.ac {
		background: #999999;
	}
</style>